<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="./lib/vue.min.js"></script>
</head>
<body>      
    <div id="app">
    <!-- 需求： 点击按钮让h3显示，在点击按钮让h3隐藏 -->
    <input type="button" value="点击" @click = "toggle">
    <h3 v-if = "flag">你是风儿，我是沙</h3>
    </div>
    
    <script>
        var vm = new Vue({
            el:"#app",
            data:{
                flag : true
            },
            methods: {
                toggle() {
                    this.flag = !this.flag
                }
            }
        })
    </script>
</body>
</html>